package common.util;

import java.util.Vector;

public class CommSplitString {
	public static String[] split(String original,String regex)
    {
		int startIndex = 0;
		Vector v = new Vector();
		String[] str = null;
		int index = 0;

		startIndex = original.indexOf(regex);

		while(startIndex < original.length() && startIndex != -1)
		{
				String temp = original.substring(index,startIndex);

				v.addElement(temp);

				index = startIndex + regex.length();

				startIndex = original.indexOf(regex,startIndex + regex.length());
		}

		v.addElement(original.substring(index));
		str = new String[v.size()];
		for(int i=0;i<v.size();i++)
		{
			str[i] = (String)v.elementAt(i);
		}

		return str;
    }
}
